﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Toenda.Foundation.Utility {
	/// <summary>
	/// Implements a data object for a signature
	/// </summary>
	public class Signature {
		/// <summary>
		/// Gets or sets the key
		/// </summary>
		public string Key { get; private set; }

		/// <summary>
		/// Gets or sets the type
		/// </summary>
		public SignatureType Type { get; private set; }

		/// <summary>
		/// Creates a new instance of <see cref="Signature"/>
		/// </summary>
		public Signature() {
		}

		/// <summary>
		/// Creates a new instance of <see cref="Signature"/>
		/// </summary>
		/// <param name="key"></param>
		/// <param name="type"></param>
		public Signature(string key, SignatureType type) {
			this.Key = key;
			this.Type = type;
		}

		/// <summary>
		/// Converts the signature object to a string
		/// </summary>
		/// <returns></returns>
		public override string ToString() {
			return string.Format("{0}: {1}", this.Type, this.Key);
		}
	}
}
